<div id="Exit-status"></div>
<div class="header">
<p>
Next: [[cvs: Default options and the ~%47.cvsrc file#Default options and the ~/.cvsrc file|~/.cvsrc]], Previous: [[cvs: Overall structure of CVS commands#Overall structure of CVS commands|Structure]], Up: [[cvs: Guide to CVS commands#Guide to CVS commands|CVS commands]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>

----

<div id="CVS_0027s-exit-status"></div>
=== CVS&rsquo;s exit status ===
<div id="index-Exit-status_002c-of-CVS"></div>

<small>CVS</small> can indicate to the calling environment whether it
succeeded or failed by setting its <em>exit status</em>.
The exact way of testing the exit status will vary from
one operating system to another.  For example in a unix
shell script the &lsquo;<code>$?</code>&rsquo; variable will be 0 if the
last command returned a successful exit status, or
greater than 0 if the exit status indicated failure.

If <small>CVS</small> is successful, it returns a successful status;
if there is an error, it prints an error message and
returns a failure status.  The one exception to this is
the <code>cvs diff</code> command.  It will return a
successful status if it found no differences, or a
failure status if there were differences or if there
was an error.  Because this behavior provides no good
way to detect errors, in the future it is possible that
<code>cvs diff</code> will be changed to behave like the
other <small>CVS</small> commands.

This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
